.class public Llt/noframe/gpsfarmguide/notifications/data/callbacks/FarmisNotificationCallback;
.super Ljava/lang/Object;
.source "FarmisNotificationCallback.java"

# interfaces
.implements Llt/farmis/libraries/notificationcontroller/data/callbacks/NotificationCallback;


# static fields
.field public static final TAG:Ljava/lang/String; = "FarmisNotificationCallback"


# instance fields
.field protected mContext:Landroid/content/Context;

.field private mNotification:Llt/noframe/gpsfarmguide/notifications/data/models/FarmisNotificationModel;


# direct methods
.method public constructor <init>(Landroid/content/Context;Llt/noframe/gpsfarmguide/notifications/data/models/FarmisNotificationModel;)V
    .locals 1
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/IllegalArgumentException;
        }
    .end annotation

    .line 40
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    if-eqz p2, :cond_0

    .line 42
    invoke-virtual {p2}, Llt/noframe/gpsfarmguide/notifications/data/models/FarmisNotificationModel;->isEmpty()Z

    move-result v0

    if-nez v0, :cond_0

    .line 49
    iput-object p2, p0, Llt/noframe/gpsfarmguide/notifications/data/callbacks/FarmisNotificationCallback;->mNotification:Llt/noframe/gpsfarmguide/notifications/data/models/FarmisNotificationModel;

    .line 50
    iput-object p1, p0, Llt/noframe/gpsfarmguide/notifications/data/callbacks/FarmisNotificationCallback;->mContext:Landroid/content/Context;

    return-void

    .line 43
    :cond_0
    sget-object p1, Llt/noframe/gpsfarmguide/notifications/data/callbacks/FarmisNotificationCallback;->TAG:Ljava/lang/String;

    const-string p2, "The provided notification model is invalid, empty or null. Only valid non empty notification models should be used!"

    invoke-static {p1, p2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 45
    new-instance p1, Ljava/lang/IllegalArgumentException;

    const-string p2, "The provided notification model is invalid, empty or null. Events can only be triggered for valid, non empty notification models!"

    invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw p1
.end method


# virtual methods
.method public onAfterDeliveryAction()V
    .locals 4

    .line 61
    iget-object v0, p0, Llt/noframe/gpsfarmguide/notifications/data/callbacks/FarmisNotificationCallback;->mNotification:Llt/noframe/gpsfarmguide/notifications/data/models/FarmisNotificationModel;

    invoke-virtual {v0}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getDeliveryFlags()Llt/farmis/libraries/bitflags/BitFlags;

    move-result-object v0

    const/4 v1, 0x6

    invoke-interface {v0, v1}, Llt/farmis/libraries/bitflags/BitFlags;->isSet(I)Z

    move-result v0

    if-nez v0, :cond_0

    .line 62
    iget-object v0, p0, Llt/noframe/gpsfarmguide/notifications/data/callbacks/FarmisNotificationCallback;->mContext:Landroid/content/Context;

    const/4 v1, 0x1

    new-array v1, v1, [I

    const/4 v2, 0x0

    iget-object v3, p0, Llt/noframe/gpsfarmguide/notifications/data/callbacks/FarmisNotificationCallback;->mNotification:Llt/noframe/gpsfarmguide/notifications/data/models/FarmisNotificationModel;

    invoke-virtual {v3}, Llt/farmis/libraries/notificationcontroller/data/models/BaseNotificationModel;->getActualID()I

    move-result v3

    aput v3, v1, v2

    invoke-static {v0, v1}, Llt/farmis/libraries/notificationcontroller/receivers/NotificationUpdateBroadcastReceiver;->sendNotificationDeliveredBroadcast(Landroid/content/Context;[I)V

    :cond_0
    return-void
.end method

.method public onAfterDismissalAction(Z)V
    .locals 0

    return-void
.end method

.method public onBeforeDeliveryAction()Z
    .locals 1

    const/4 v0, 0x0

    return v0
.end method

.method public onBeforeDismissalAction(Z)Z
    .locals 0

    const/4 p1, 0x0

    return p1
.end method
